<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8" import="com.tz.hospital.entity.*, java.util.List "%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<!-- 引入 layui.css -->
<link rel="stylesheet" href="/hospital_system/layui-v2.6.8/layui/css/layui.css"/>
<!-- 引入 layui.js -->
<script src="/hospital_system/layui-v2.6.8/layui/layui.js"></script>
<style type="text/css">
.ks{

margin-top: 500px;
margin-left: 200px;
}
.ys{

margin-top: -325px;
margin-left: 650px;
}
table tbody {

display:block;

height:315px;

overflow-y:scroll;

-webkit-overflow-scrolling: touch; // 为了滚动顺畅

}

table tbody::-webkit-scrollbar {

display: none; 

}

table thead, tbody tr {

display:table;



table-layout:fixed;

}

table thead {

width: calc( 100% - 1em )

}


</style>
</head>
<body>
<%List<hospital_emp> lb=(List)request.getAttribute("lb"); %>
<%List<hospital_ypcf> lyj=(List)request.getAttribute("lyj"); %>
<%List<hospital_xmjl> lxj=(List)request.getAttribute("lxj"); %>

        
<div class="layui-row layui-col-space10">
  <div class="layui-col-md9">
    <div class="layui-panel">
      <div style="padding: 10px;"><form class="layui-form layui-form-pane" action="/hospital_system/insertpreController">
  
  <div class="layui-form-item">
    <label class="layui-form-label">挂号单</label>
    <div class="layui-input-inline">
      <input type="text" name="cfid" lay-verify="required" value="<%=session.getAttribute("ghid") %>" autocomplete="off" style="pointer-events: none;" class="layui-input">
    </div>
  </div>
  
  <div class="layui-form-item">
    <div class="layui-inline">
      <label class="layui-form-label">姓名</label>
      <div class="layui-input-block">
        <input type="text" name="date" id="date1" autocomplete="off" class="layui-input" value="<%=lb.get(0).getBrName() %>" style="pointer-events: none;">
      </div>
    </div>
    <div class="layui-inline">
      <label class="layui-form-label">性别</label>
      <div class="layui-input-inline">
        <input type="text" name="number" autocomplete="off" class="layui-input" value="<%=lb.get(0).getBrsex() %>" style="pointer-events: none;">
      </div>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">电话</label>
    <div class="layui-input-inline">
      <input type="text" name="username" lay-verify="required" autocomplete="off" class="layui-input" value="<%=lb.get(0).getBrtelephone() %>" style="pointer-events: none;">
    </div>
  </div>
  <div class="layui-form-item layui-form-text">
    <label class="layui-form-label">描述</label>
    <div class="layui-input-block">
      <textarea placeholder="请输入内容" class="layui-textarea" name="ms"></textarea>
    </div>
  </div>
  
  
  <div class="layui-form-item">
    <button type="submit" class="layui-btn">提交处方</button>
  </div>
</form>

<div class="layui-row layui-col-space5">
  <div class="layui-col-md6">
    <div class="layui-panel">
      <div style="padding: 30px;">药：<table class="layui-table"  style="background-color:transparent; border:0px;">
             
       <tbody>     
        <% if (lyj!=null){ %>
      <%  for(hospital_ypcf e:lyj){ %>
        	  <tr>
        	  <td style="width:200px"><%=e.getYpname() %></td>        	  
        	  <td style="width:30px"><button onclick="location.href='/hospital_system/deleypcfController?ypreid=<%=e.getYpreid() %>'">删除</button></td>        	  
        	  </tr>       	  
         <% } %>
         <% } %>
       </tbody>      
   </table>  </div>
    </div>   
  </div>
  <div class="layui-col-md6">
    <div class="layui-panel">
      <div style="padding: 30px;">项目：<table class="layui-table rs"  style="background-color:transparent; border:0px;">
             
       <tbody>     
        <% if (lyj!=null){ %>
      <%  for(hospital_xmjl e:lxj){ %>
        	  <tr>
        	  <td style="width:200px"><%=e.getXmname() %></td>        	  
        	  <td style="width:30px"><button onclick="location.href='/hospital_system/delexmcfController?xmreid=<%=e.getXmreid() %>'">删除</button></td>        	  
        	  </tr>       	  
         <% } %>
         <% } %>
       </tbody>      
   </table>  </div>
    </div>   
  </div>
</div>    
	
   
  
   </div>
    </div>   
  </div>
  <div class="layui-col-md3" style="heigh:600px">
    
      <div style="padding: 10px;">
      	<br/>
      	
      	
      	
      	<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
  <ul class="layui-tab-title">
    <li class="layui-this">开药</li>
    <li>做项目</li>
    
  </ul>
   <div class="layui-tab-content" style="height: 100px;">
    <div class="layui-tab-item layui-show">
    <button onclick="login()">添加药品</button>
    <table class="layui-table"  style="background-color:transparent; border:0px; ">
           
       <tbody>
       <%List<hospital_drug> lyp=(List)request.getAttribute("lyp"); %>
        <% if (lyp!=null){ %>
      <%  for(hospital_drug e:lyp){ %>
        	  <tr>
        	  <td style="width:10px"><input type="checkbox" name="fxk" lay-skin="primary" value="<%=e.getYpid() %>"> </td>
        	  <td style="width:200px"><%=e.getYpname() %></td>
        	  <td style="width:40px"><%=e.getYpmoney() %></td>
        	       	  
        	  </tr>       	  
         <% } %>
         <% } %>
       </tbody>
  </table>	</div>
    <div class="layui-tab-item">
    <button onclick="loginxm()">添加项目</button>
    <table class="layui-table"  style="background-color:transparent; border:0px; ">
           
       <tbody>
       <%List<hospital_project> lxm=(List)request.getAttribute("lxm"); %>
        <% if (lxm!=null){ %>
      <%  for(hospital_project e:lxm){ %>
        	  <tr>
        	  <td style="width:10px"><input type="checkbox" name="xmk" lay-skin="primary" value="<%=e.getXmid() %>"> </td>
        	  <td style="width:200px"><%=e.getXmname() %></td>
        	  <td style="width:40px"><%=e.getMoney() %></td>
        	       	  
        	  </tr>       	  
         <% } %>
         <% } %>
       </tbody>
  </table>	</div>
  </div>
</div>      
      </div>
      
  </div>
</div>		
   
      
   
  </div>
  <script type="text/javascript">
    function login(){
    	//通过名字获取  getElementsByName
        var obj = document.getElementsByName("fxk");
        var xz="";
        var arr=[]
        //通过标签获取  getElementsByTagName
        //var obj = document.getElementsByTagName("input");
            for(var i=0; i<obj.length; i ++){
                if(obj[i].checked){
                   //xz+=obj[i].value;
                   arr.push(obj[i].value);
                }
            }
            xz=arr.join();
            console.log(xz);
    	//var tel=document.getElementById("tel").value;
    	//var pass=document.getElementById("pass").value;    	
    	location.href="/hospital_system/insertypjlController?ypid="+xz+"&cfid="+<%=request.getAttribute("cfid") %>;
    }
    function loginxm(){
    	//通过名字获取  getElementsByName
        var obj = document.getElementsByName("xmk");
        var xz="";
        var arr=[]
        //通过标签获取  getElementsByTagName
        //var obj = document.getElementsByTagName("input");
            for(var i=0; i<obj.length; i ++){
                if(obj[i].checked){
                   //xz+=obj[i].value;
                   arr.push(obj[i].value);
                }
            }
            xz=arr.join();
            console.log(xz);
    	//var tel=document.getElementById("tel").value;
    	//var pass=document.getElementById("pass").value;    	
    	location.href="/hospital_system/insertxmjlController?xmid="+xz+"&cfid="+<%=request.getAttribute("cfid") %>;
    }
    </script>
</body>
</html>